Skip to content

feat(glass): P6 slice 1 — authoritative incident posture - #118

Merged
EmergentKnowledgeGroup merged 3 commits into
mainfrom
codex/glass-office-cross-floor-completion
Jul 27, 2026
Merged

feat(glass): P6 slice 1 — authoritative incident posture#118
EmergentKnowledgeGroup merged 3 commits into
mainfrom
codex/glass-office-cross-floor-completion

Conversation

@EmergentKnowledgeGroup

Copy link
Copy Markdown
Owner

P6 slice 1 — authoritative incident posture

Replaces the generic critical/high event-burst incident auto-trigger with a pure, tested composition over facts the existing controllers already own, and renders one calm/incident posture model in the Glass shell.

What changed

  • New pure module src/glass/incidentPosture.tscomposeIncidentPosture accepts only already-authoritative loaded/unknown facts and returns calm, unknown, or exactly one prioritized incident with plain copy, an authoritative detail line, a stable dedupe causeKey, and one stable-room target. Priority: receipt integrity → runtime-host fault/recovery → delegation recovery → gateway connection failure → open core breakers → faulted plugins → failed/partial work whose projection explicitly needs the owner. No events, no severity copy, no clocks, no invented backend health.
  • Pure incident-mode policy in the same moduledecideAutomaticIncidentMode + applyOperatorIncidentToggle: the operator toggle stays an explicit presentation override ("off" silences exactly the current causeKey; a new cause re-raises; "on" holds through calm), unknown holds the mode, calm clears it without a click, and one cause never announces twice.
  • App.tsx — the 1-second tick interval, ws-degraded timers, high-burst counting, cooldown timestamps, and the critical-event hook in handleGatewayEvent are gone. A useMemo composes posture from useMissionControlController (gateway/jobs status, open core/plugin breakers), the connection controller's health/ws states, and the Office controller's summary/stop-all/integrity facts. One idempotent effect applies the pure decision. incident_auto_trigger keeps its exact meaning: it gates automatic mode switching only.
  • useExecassOfficeController — latches execass.v1.receipt.integrity_failed from the one durable stream as integrityFailure (summary + sequence) beside the existing critical notice; the latch is identity-bound and clears when the gateway URL or token-configured boundary changes. No new controller, websocket, event store, or polling loop.
  • AppShell — a quiet posture word (Calm / Checking / Incident, never color alone) beside the operator toggle, and one plain-language incident band under the topbar: beacon + "Incident" label, message, authoritative detail, and one "Go to " action resolved against the live elevator registry (an unavailable room renders an honest note, not a dead button). Band is role="status" aria-live="polite", wraps at 390px, and inherits the global reduced-motion kill.
  • Dead code removed — the burst helpers in lib/liveFeed.ts and the five burst/cooldown knobs in opsUxConfig safety (their only consumer was the deleted trigger). fail_safe_on_config_error, recovery, and undo knobs are untouched.
  • Mock gateway — one new e2e seam POST /api/v1/e2e/execass-event that injects a durable ExecAss event through the same broadcast path production events use.

Explicit non-incidents (each unit-proven)

waiting_external, owner global stop/freeze, intentionally paused runtime (unless the host is actually faulted), scheduler idle or merely-due work, failed/partial delegations with no intervention fact, ordinary confirmation/clarification attention on healthy work, transient connecting/reconnecting states, and unloaded sources (posture unknown, never "healthy").

Validation

  • npm run typecheck PASS · npm run lint PASS
  • npm run test:unit -- --run PASS: 803/803 tests (82 files) — includes 38 new composer/policy truth-table tests, 2 new office-controller integrity-latch tests, 5 new AppShell band tests
  • npm run build PASS
  • Full core Playwright suite PASS: 46/46 scenarios including the new @core @p6-incident scenario (Checking→Calm truth, breaker trigger with auto mode + toast, keyboard-activated walk to the exact breaker in the Breakers room, same-cause operator override, authoritative auto-recovery without a click, higher-priority receipt-integrity cause arriving live through the one ExecAss stream from another floor with walk to the Office desk, 390px band/status geometry with non-overlap and no horizontal overflow, reduced-motion fresh sitting, zero console/page/request-failure/HTTP-error tolerance)
  • live-feed.spec.ts burst test rewritten to the new truth: event volume and critical severity copy never flip incident mode; a real open-breaker fact still does
  • ExecAss generated contract check (generate_execass_contract --check) PASS · independent validator PASS · git diff --check PASS
  • Six evidence screenshots captured to runtime/qa/p6-incident-posture/ and visually inspected (calm, breaker incident, recovered, integrity incident, 390px integrity, reduced-motion) at desktop and 390px

🤖 Generated with Claude Code

EmergentKnowledgeGroup and others added 2 commits July 26, 2026 15:53
Replace the critical/high event-burst auto-trigger with a pure, tested
composition over facts the existing controllers already own. One
prioritized incident (receipt integrity, runtime-host fault/recovery,
delegation recovery, connection failure, core/plugin breakers, then
failed/partial work explicitly needing the owner) renders as a single
plain-language shell band with one walk-there action to the exact
stable room; calm clears without a click, unknown sources are never
labeled healthy, and the operator toggle stays a same-cause override.
The Office controller latches receipt.integrity_failed from the one
durable stream, identity-bound to the gateway. Burst helpers, tick
timers, and dead cooldown knobs are removed; the live-feed spec now
proves event volume and severity copy never flip incident mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ee87bbee-79cb-451a-ba34-32e4e9fffa46

📥 Commits

Reviewing files that changed from the base of the PR and between 2d99d98 and 97d18dd.

📒 Files selected for processing (18)
  • apps/mission-control/e2e/live-feed.spec.ts
  • apps/mission-control/e2e/mockGateway.mjs
  • apps/mission-control/e2e/p6-incident-posture.spec.ts
  • apps/mission-control/src/App.tsx
  • apps/mission-control/src/app/AppShell.test.tsx
  • apps/mission-control/src/app/AppShell.tsx
  • apps/mission-control/src/app/useGatewayEvents.test.tsx
  • apps/mission-control/src/app/useGatewayEvents.ts
  • apps/mission-control/src/features/execassOffice/useExecassOfficeController.test.tsx
  • apps/mission-control/src/features/execassOffice/useExecassOfficeController.ts
  • apps/mission-control/src/glass/incidentPosture.test.ts
  • apps/mission-control/src/glass/incidentPosture.ts
  • apps/mission-control/src/lib/liveFeed.test.ts
  • apps/mission-control/src/lib/liveFeed.ts
  • apps/mission-control/src/lib/opsUxConfig.test.ts
  • apps/mission-control/src/lib/opsUxConfig.ts
  • apps/mission-control/src/styles.css
  • docs/plans/2026-07-23-glass-office-claude-resume.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/glass-office-cross-floor-completion

Comment @coderabbitai help to get the list of available commands.

@EmergentKnowledgeGroup

Copy link
Copy Markdown
Owner Author

Hostile QA correction pushed at \97d18dd\ (single correction commit; no manual CodeRabbit re-review request).\n\nCorrections:\n- bootstrap the authoritative Office summary/stop-all facts cross-floor without marking unseen content displayed\n- bind summary, stop-all, receipt-integrity state, pending reads, acknowledgements, websocket ownership, and resume cursor to same-URL credential generation\n- reject late prior-identity responses and resume replacement credentials from cursor 0\n- discover receipt quarantine from production's exact 500 \�xecass.v1.receipt_integrity_quarantined\ response, force a post-event verification if a pre-event read was in flight, and clear only after a later authoritative summary succeeds\n- strengthen browser proof for Checking/Calm, integrity recovery, unavailable destination, 390px vertical/center-hit geometry, computed reduced motion, exact expected error accounting, and clean evidence captures\n\nFinal-byte local proof:\n- typecheck PASS\n- lint PASS (0 warnings)\n- unit 812/812 PASS\n- build PASS\n- core E2E 46/46 PASS (6.8m)\n- ExecAss contract validator PASS; validator tests 20/20 PASS\n- git diff --check PASS; mixed-EOL App diff is exactly +2 lines\n- eight unique nonzero desktop/390 evidence screenshots inspected

@EmergentKnowledgeGroup
EmergentKnowledgeGroup merged commit f4fc22f into main Jul 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant